package ch.penas.business.dom;

import java.io.Serializable;

/** @author Daniel */
public class RechercheFormateur implements Serializable {

    /** La serialization de la class RechercheUtilisateur pour question de securiter. */
    private static final long serialVersionUID = -6146935825517747043L;

    private String searchNom;
    private String searchPrenom;
    private String searchMail;
    private String searchUser;
    private String searchPassword;

    public RechercheFormateur() { }

    public RechercheFormateur(final String aNom, final String aPrenom, final String aMail, final String aUser, final String aPassword) {
        this.searchNom = aNom;
        this.searchPrenom = aPrenom;
        this.searchMail = aMail;
        this.searchUser = aUser;
        this.searchPassword = aPassword;
    }

    public final String getSearchNom() {
    	return searchNom;
	}
	public final void setSearchNom(final String aNom) {
		this.searchNom = aNom;
	}

	public final String getSearchPrenom() {
		return searchPrenom;
	}
	public final void setSearchPrenom(final String aPrenom) {
		this.searchPrenom = aPrenom;
	}

	public final String getSearchMail() {
		return searchMail;
	}
	public final void setSearchMail(final String aMail) {
		this.searchMail = aMail;
	}

	public final String getSearchUser() {
		return searchUser;
	}
	public final void setSearchUser(final String aUser) {
		this.searchUser = aUser;
	}

	public final String getSearchPassword() {
		return searchPassword;
	}
	public final void setSearchPassword(final String aPassword) {
		this.searchPassword = aPassword;
	}



	public final void validate() {
		if (this.getSearchNom() == null) {
			throw new IllegalArgumentException(
				"Le champ: (nom)ne doit pas etre vide");
		}
		if (this.getSearchPrenom() == null) {
			throw new IllegalArgumentException(
				"Le champ: (prenom)ne doit pas etre vide");
		}
		if (this.getSearchMail() == null) {
			throw new IllegalArgumentException(
				"Le champ: (mail) ne doit pas etre vide");
		}
		if (this.getSearchUser() == null) {
			throw new IllegalArgumentException(
				"Le champ: (mail) ne doit pas etre vide");
		}
		if (this.getSearchPassword() == null) {
			throw new IllegalArgumentException(
				"Le champ: (mail) ne doit pas etre vide");
		}
	}
}